﻿<%@ Control Language="C#" AutoEventWireup="true" Codebehind="CommandDefinition.ascx.cs"
    Inherits="Portal.Administrator.Commands.CommandDefinition" %>
<%@ Register Assembly="NCS.WebControl" Namespace="NCS.WebControls" TagPrefix="cc1" %>
<%@ Register Assembly="ComponentArt.Web.UI" Namespace="ComponentArt.Web.UI" TagPrefix="componentart" %>
<link href="/Administrator/Styles/treeStyle.css" rel="stylesheet" type="text/css">
<asp:UpdatePanel ID="uppanelCommandDefinitionUpdate" runat="server" UpdateMode="Conditional"
    RenderMode="Inline">
    <Triggers>
        <asp:AsyncPostBackTrigger ControlID="cmdUpdate" EventName="Click" />
        <asp:AsyncPostBackTrigger ControlID="cmdAddNew" EventName="Click" />
        <asp:AsyncPostBackTrigger ControlID="cmdDelete" EventName="Click" />
        <asp:AsyncPostBackTrigger ControlID="tvwCmds" EventName="NodeSelected" />
        <asp:AsyncPostBackTrigger ControlID="cmdEmpty" EventName="Click" />
    </Triggers>
    <ContentTemplate>
        <table border="0" cellpadding="0" cellspacing="0" height="100%" width="100%">
            <tr>
                <td class="Contentbody_Left" style="width: 50%;" valign="top">
                    <componentart:TreeView ID="tvwCmds" runat="server" AutoPostBackOnSelect="True" CausesValidation="False"
                        ClientScriptLocation="/JScripts/componentart_webui_client/" CollapseImageUrl="/Administrator/Images/TreeView/exp.gif"
                        ExpandCollapseImageHeight="11" ExpandCollapseImageWidth="14" ExpandImageUrl="/Administrator/Images/TreeView/col.gif"
                        Height="100%" HoverNodeCssClass="HoverTreeNode" NodeCssClass="TreeNode" NodeIndent="15"
                        NodeRowCssClass="TreeNodeRow" NoExpandImageUrl="/Administrator/Images/TreeView/noexp.gif"
                        OnNodeSelected="tvwCmds_NodeSelected" PreloadCurrentPath="True" SelectedNodeCssClass="SelectedTreeNode"
                        Width="100%" meta:resourcekey="tvwCmdsResource1">
                    </componentart:TreeView>
                </td>
                <td width="5">
                </td>
                <td valign="top" style="width:50%;">
                    <table class="InputBox" style="width:100%;">
                        <tr>
                            <td colspan="2">
                                <asp:Label ID="lblUpdateStatus" runat="server" meta:resourcekey="lblUpdateStatusResource1"
                                    Font-Bold="True" ForeColor="Blue"></asp:Label>
                            </td>
                        </tr>
                        <tr>
                            <td style="width:30%;">
                                <strong>
                                    <asp:Label ID="lblID" runat="server" Text="ID" meta:resourcekey="lblIDResource1"></asp:Label></strong></td>
                            <td style="width: 70%;">
                                <asp:TextBox ID="txtID" runat="server" Enabled="False" Width="49px" meta:resourcekey="txtIDResource1"></asp:TextBox></td>
                        </tr>
                        <tr>
                            <td colspan="2" align="left">
                                <asp:DataGrid ID="dgrNameFollowLang" runat="server" Width="100%" AllowSorting="True"
                                    AllowPaging="True" AutoGenerateColumns="False" ShowHeader="False" GridLines="None">
                                    <ItemStyle BackColor="White"></ItemStyle>
                                    <Columns>
                                        <asp:BoundColumn Visible="False" DataField="CommandID"></asp:BoundColumn>
                                        <asp:BoundColumn Visible="False" DataField="Lang"></asp:BoundColumn>
                                        <asp:TemplateColumn>
                                            <HeaderStyle HorizontalAlign="Center"></HeaderStyle>
                                            <ItemStyle HorizontalAlign="Left" VerticalAlign="Middle"></ItemStyle>
                                            <ItemTemplate>
                                                <table cellpadding="0" cellspacing="0" width="100%">
                                                    <tr>
                                                        <td colspan="2">
                                                            <asp:Label ForeColor="Red" runat="server" ID="lblLang" Text='<%# Eval("Language_Name") %>'></asp:Label>
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td style="width: 30%;">
                                                            <strong>
                                                                <asp:Label ID="lblName" runat="server" Text="Tên" meta:resourcekey="lblNameResource1"></asp:Label></strong>
                                                        </td>
                                                        <td style="width:70%;">
                                                            <asp:TextBox runat="server" ID="txtName" Text='<%# Eval("CommandName") %>'></asp:TextBox>
                                                            <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="txtName"
                                                                Display="Dynamic" ErrorMessage="(*)" meta:resourcekey="RequiredFieldValidator2Resource1"></asp:RequiredFieldValidator>
                                                        </td>
                                                    </tr>
                                                </table>
                                            </ItemTemplate>
                                        </asp:TemplateColumn>
                                    </Columns>
                                    <PagerStyle Visible="False"></PagerStyle>
                                </asp:DataGrid>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <strong>
                                    <asp:Label ID="lblCommands" runat="server" Text="Lệnh" meta:resourcekey="lblCommandsResource1"></asp:Label></strong></td>
                            <td>
                                <asp:DropDownList ID="dropCommandKeys" runat="server" DataTextField="ControlPath"
                                    DataValueField="ControlKey" Width="100%" meta:resourcekey="dropCommandKeysResource1">
                                </asp:DropDownList>
                                </td>
                        </tr>
                        <tr>
                            <td>
                                <strong>
                                    <asp:Label ID="lblParam" runat="server" Text="Tham số" meta:resourcekey="lblParamResource1"></asp:Label></strong></td>
                            <td>
                                <asp:TextBox ID="txtParams" runat="server" Width="100%" meta:resourcekey="txtParamsResource1"></asp:TextBox></td>
                        </tr>
                        <tr>
                            <td>
                                <strong>
                                    <asp:Label ID="lblLinkUrl" runat="server" Text="Link Url" meta:resourcekey="lblLinkUrlResource1"></asp:Label></strong></td>
                            <td>
                                <asp:TextBox ID="txtUrl" runat="server" Width="100%" meta:resourcekey="txtUrlResource1"></asp:TextBox></td>
                        </tr>
                        <tr>
                            <td>
                                <strong>
                                    <asp:Label ID="lblParent" runat="server" Text="Cha" meta:resourcekey="lblParentResource1"></asp:Label></strong></td>
                            <td>
                                <asp:DropDownList ID="dropParent" runat="server" Width="100%" meta:resourcekey="dropParentResource1">
                                </asp:DropDownList></td>
                        </tr>
                        <tr>
                            <td>
                                <strong>
                                    <asp:Label ID="lblOrder" runat="server" Text="Thứ tự" meta:resourcekey="lblOrderResource1"></asp:Label></strong></td>
                            <td>
                                <asp:DropDownList ID="dropIndex" runat="server" Width="88px" meta:resourcekey="dropIndexResource1">
                                </asp:DropDownList></td>
                        </tr>
                        <tr>
                            <td>
                                <strong>
                                    <asp:Label ID="lblActive" runat="server" Text="Hoạt động" meta:resourcekey="lblActiveResource1"></asp:Label></strong></td>
                            <td>
                                <asp:CheckBox ID="chkEnable" runat="server" Checked="True" CssClass="input" meta:resourcekey="chkEnableResource1" /></td>
                        </tr>
                        <tr>
                            <td style="height: 40px">
                                <strong>
                                    <asp:Label ID="lblVisible" runat="server" Text="Hiện thị" meta:resourcekey="lblVisibleResource1"></asp:Label></strong></td>
                            <td style="height: 40px">
                                <asp:CheckBox ID="chkVisble" runat="server" Checked="True" CssClass="input" meta:resourcekey="chkVisbleResource1" /></td>
                        </tr>
                        <tr>
                            <td style="height: 40px">
                                <asp:Label ID="labWeb" runat="server" Text="Cpanel" meta:resourcekey="lblWebResource1" Font-Bold="True"></asp:Label>
                                </td>
                            <td style="height: 40px">
                                <asp:CheckBox ID="chkWeb" runat="server" CssClass="input" meta:resourcekey="chkWebResource1"/></td>
                        </tr>
                        <tr>
                            <td style="height: 40px">
                                <strong>
                                    <asp:Label ID="lblIsSuperUser" runat="server" Text="Is Super User" meta:resourcekey="lblIsSuperUserResource1"></asp:Label></strong></td>
                            <td style="height: 40px">
                                <asp:CheckBox ID="chkIsSuperUser" runat="server" Checked="True" CssClass="input"
                                    meta:resourcekey="chkIsSuperUserResource1" /></td>
                        </tr>
                    </table>
                </td>
            </tr>
        </table>
    </ContentTemplate>
</asp:UpdatePanel>
<br />
<table border="0" cellpadding="0" cellspacing="0" height="100%" >
    <tr>
        <td width="350">&nbsp;
        </td>
        <td width="15">
        </td>
        <td>
            <table id="Table2" height="35" width="100%" border="0" cellpadding="3" cellspacing="0"
                class="UpdateBox">
                <tr>
                    <td align="center">
                        <cc1:ButtonRoleEdit ID="cmdUpdate" runat="server" OnClick="cmdUpdate_Click" Text="Cập nhật"
                            CssClass="Button" Width="77px" />
                            <cc1:ButtonRoleAdd ID="cmdAddNew" runat="server"
                                OnClick="cmdAddNew_Click" Text="Thêm mới" CssClass="Button" Width="77px" />
                                <cc1:ButtonRoleDelete
                                    ID="cmdDelete" runat="server" OnClick="cmdDelete_Click" Text="Xóa" CssClass="Button" Width="77px" />
                        <asp:Button ID="cmdEmpty" runat="server" CausesValidation="False" CssClass="Button"
                            OnClick="cmdEmpty_Click" Text="Hủy" Width="77px" meta:resourcekey="cmdEmptyResource1" />
                        </td>
                </tr>
            </table>
        </td>
    </tr>
</table>
